/**
 * 
 */
package cn.panda.edu.service.impl;

import cn.panda.edu.dao.PartSectionMapper;
import cn.panda.edu.model.PartSection;
import cn.panda.edu.service.PartSectionService;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**  
 * 类描述：  
 * @author: 苑庆涛 
 * @date： 2018-01-18 上午10:44:12  
 */
@Service
public class PartSectionServiceImpl implements PartSectionService {

	@Resource
	private PartSectionMapper  partSectionMapper;
	/* (non-Javadoc)
	 * @see cn.panda.edu.serviceapi.PartSectionService#insertSelective(cn.panda.edu.model.PartSection)
	 */
	@Override
	public int insertSelective(PartSection record) {
		// TODO Auto-generated method stub
		return partSectionMapper.insertSelective(record);
	}

	/* (non-Javadoc)
	 * @see cn.panda.edu.serviceapi.PartSectionService#updateByPrimaryKeySelective(cn.panda.edu.model.PartSection)
	 */
	@Override
	public int updateByPrimaryKeySelective(PartSection record) {
		// TODO Auto-generated method stub
		return partSectionMapper.updateByPrimaryKeySelective(record);
	}

	@Override
	public PageInfo<PartSection> selectBySectionId(Integer id, Integer pageIndex) {
		Page<PartSection> list = PageHelper.startPage(pageIndex, 10);
		partSectionMapper.selectBySectionId(id) ;
		return new PageInfo<>(list);
	}

}
